package com.cci.kangdao.service;

import org.springframework.web.servlet.ModelAndView;

import javax.mail.MessagingException;
import java.io.UnsupportedEncodingException;
import java.util.Map;

/**
 * @Description: 发送手机验证码及验证
 * @Company: CTY
 * @author 米艳春
 * @date 2018-01-17
 * @version 1.0
 */
public interface MobileSmsService {

	/**
	 * App获取短信接口
	 * @param map
	 * @return
	 */
	public ModelAndView getMobileSms(Map map); 
	
	/**
	 * App验证手机号接口
	 * @param map
	 * @return
	 */
	public ModelAndView verifyMobile(Map map);

	/**
	 * 短信验证码次数加一
	 * @param mobile
	 * @return
	 */
	int smsCodeTimes(String mobile,int timeMax);

	/**
	 * 通过邮箱获取验证码
	 * @param map
	 * @return
	 */
	public ModelAndView getCodeByEmail(Map<String, Object> map) throws UnsupportedEncodingException, MessagingException ;
	
	/**
	 * 验证邮箱验证码
	 * @param map
	 * @return
	 */
	public ModelAndView verifyEmailCode(Map<String, Object> map);
}